/**
 * Director：导演, 建造的执行者，它负责发布命令
 * @author MIAO
 */
package com.ismiao.designPattern.Builder;

public class Director {
	private Builder builder;

	public Director(Builder builder) {//该构造以Builder为参数
		this.builder = builder;
	}
	
	// 将部件partA partB partC最后组成复杂对象
	// 这里是将车轮、方向盘和发动机组装成汽车的过程
	public void construct() { 
		builder.buildPartA();
		builder.buildPartB();
		builder.buildPartC();
	}
}
